<!DOCTYPE html>
<html lang="en">
<body>
	<div id="counter1"></div>
	<script
		src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script>
		(function($) {
			$.fn.count = function() {
				// "this" is equal to jQuery('#counter1')     
				alert(this); // Alerts jQuery object     
				alert(this[0]); // Alerts div element      
				alert(this[0].id); // Alerts "counter1" 
			};
		})(jQuery);
		jQuery('#counter1').count();
	</script>
</body>
</html>